import 'package:flutter_eve_plugin/model/ye_xiu/achieves/archieves_ability_detail_entity.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/achieves/archieves_ability_entity.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/achieves/archieves_form_entity.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/achieves/archieves_role_entity.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/achieves/archieves_weapon_entity.dart';

class ArchievesState {
  ArchievesWeaponEntity archievesWeaponEntity;
  ArchievesRoleEntity archievesRoleEntity;
  ArchievesFormEntity achievesFormData;
  ArchievesAbilityEntity abilityEntity;
  ArchievesAbilityDetailEntity abilityDetailEntity;

  ArchievesState(
      {this.archievesWeaponEntity,
      this.archievesRoleEntity,
      this.achievesFormData,
      this.abilityEntity,
      this.abilityDetailEntity});

  ArchievesState copyWith(
      {ArchievesWeaponEntity achievesWeaponEntity,
      ArchievesRoleEntity achivevesRoleEntity,
      ArchievesFormEntity achievesFormEntity,
      ArchievesAbilityEntity archievesAbilityEntity,
      ArchievesAbilityDetailEntity abilityDetailEntity}) {
    return ArchievesState(
        archievesWeaponEntity:
            achievesWeaponEntity ?? this.archievesWeaponEntity,
        archievesRoleEntity: achivevesRoleEntity ?? this.archievesRoleEntity,
        achievesFormData: achievesFormEntity ?? this.achievesFormData,
        abilityEntity: archievesAbilityEntity ?? this.abilityEntity,
        abilityDetailEntity: abilityDetailEntity ?? this.abilityDetailEntity);
  }

  static ArchievesState initialState() {
    return ArchievesState(
        archievesWeaponEntity: ArchievesWeaponEntity(
            maxFormLevel: 0,
            upgradeGoods: [],
            nextWeaponProperty: null,
            currentForm: null,
            currentWeaponProperty: null,
            nextForm: null,
            formUpgradeGoods: [],
            weaponLevel: 0,
            maxWeaponLevel: 0,
            formLevel: 0),
        archievesRoleEntity: ArchievesRoleEntity(
            cardInfo: null, roleInfo: null, userWeaponBaseInfo: null),
        achievesFormData: ArchievesFormEntity(data: []),

        abilityEntity: ArchievesAbilityEntity(code: 0, data: [], message: ''),
        abilityDetailEntity: ArchievesAbilityDetailEntity(
            propertyList: [], totalCount: 0, totalPages: 0, currentPage: 0));
  }
}
